import requests

# zrlog后台登录页地址
# url = "http://127.0.0.1:8080/admin/login"

# 发送get请求
# response = requests.get(url=url)

# 返回响应内容的html内容
# print(response.text)
#
# print("-------------------------------")
#
# # 返回http协议状态码
# print(response.status_code)

###############################################

url = 'https://www.baidu.com/'
# 定义自定义请求头
headers = {
    "User-Agent": "Mozilla/5.0 (Macintosh; intel Mac Os x 10 14 0) AppleWebKit/537.36 (KHTML, like Gecko) chrome/71.0.3578.98 Safari/537.36"
}
# 发送自定义请求头
response = requests.get(url, headers=headers)
# 返回响应内容的html内容
print(response.text)
